/* eslint-disable */
const Mock = require('mockjs') // mockjs 导入依赖模块
const url = {
    tableDataOne: 'http://www.liulongbin.top:3005/login'
}
Mock.mock(url.tableDataOne, 'post', function(req) {
    const { values: res } = JSON.parse(req.body)
    if (res.username === 'admin' && res.password === '123456') {
        return {
            token: '123123',
            success: true
        }
    } else {
        return {
            success: false
        }
    }
})

// 方式2-返回随机数据
// return Mock.mock({
//     id: "@id()",//得到随机的id,对象
//     username: "@cname()",//随机生成中文名字
//     date: "@date()",//随机生成日期
//     avatar: "@image('200x200','red','#fff','avatar')",//生成图片,参数:size, background, foreground, text
//     description: "@paragraph()",//描述
//     ip: "@ip()",//IP地址
//     email: "@email()"//email
// })